package mini.ideashare.cms.dao;

import mini.ideashare.cms.model.Article;
import mini.ideashare.cms.model.qc.ArticleQC;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

@Mapper
@Repository
public interface ArticleDAO{

    int insertArticle(Article article);

    int updateArticle(Article article);

    List<Article> listArticle(ArticleQC article);

    Long countArticle(ArticleQC article);

    int insertBatch(@Param("list") List<Article> articles);

    int deleteArticleById(Long id);

}